package com.example.sls.service.impl.user;

import com.example.sls.pojo.user.Users;
import com.example.sls.dao.user.UsersDao;
import com.example.sls.service.intserfaces.user.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户表(Users)表服务实现类
 *
 * @author 蓝江富
 * @since 2024-06-13 12:08:38
 */
@Service
public class UsersServiceImpl implements UsersService {
  @Autowired
  UsersDao usersDao;

  @Override
  public Users queryById(Integer id) {
    return usersDao.queryById(id);
  }

  @Override
  public int deleteById(Integer id) {
    return usersDao.deleteById(id);
  }

  @Override
  public int update(Users users) {
    return usersDao.update(users);
  }

  @Override
  public int insert(Users users) {
    return usersDao.insert(users);
  }

  @Override
  public long count() {
    return usersDao.count();
  }

  @Override
  public List<Users> queryAllByLimit(Users users, Integer pageSize, Integer offset) {
    return usersDao.queryAllByLimit(users, pageSize, offset);
  }

  @Override
  public Users findByUsersName(String username) {
    return usersDao.findByUsersName(username);
  }
}
